package nbcp.base.model


import org.apache.commons.collections4.map.CaseInsensitiveMap


class HttpResponseModel {
    var name: String? = null

    var status: Int = -1

    var responseBody: String? = null
    val responseHeader: CaseInsensitiveMap<String, String> = CaseInsensitiveMap()

    val contentType: String?
        get() = responseHeader["Content-Type"]


    /**
     * 添加响应头
     *
     * @param key
     * @param value
     */
    fun addHeader(key: String, value: String) {
        responseHeader[key] = value
    }
}
